There exist various kinds of recording mediums for recording digital data like music content and video data, such as a magnetic disk, an optical disk and a magneto-optical disk. Among these recording mediums, there is known a memory card using a semiconductor memory such as a flash ROM as a storage device. Since reduction in size of the recording medium is realized, the memory card using the semiconductor memory has rapidly spread in use mainly for small-sized portable equipment such as a digital still camera and a mobile phone terminal. Further, the semiconductor memory has come to be used in applications as a storage built in equipment, as well as in applications as a detachable removable medium such as the conventional memory card. For example, by building a semiconductor memory such as a flash ROM in equipment, the semiconductor memory is used in place of a hard disk.
As such a memory card and a storage built in equipment, a semiconductor device called a NAND flash memory has been mainly used. The NAND flash memory is a storage device where already recorded data is once erased and thereafter another data can be recorded again. The NAND flash memory can constitute a recording device that can be overwritten a plurality of times, as can the conventional hard disk.
FIG. 2 is a diagram showing a configuration of the NAND flash memory. The NAND flash memory includes a plurality of physical blocks. The physical block is a unit at the time of erasing data recorded in the NAND flash memory. The NAND flash memory has characteristics that data cannot be directly overwritten and that recorded data has to be once erased in units of physical blocks without fail at the time of data writing.
This physical block includes a plurality of pages. The page is a unit at the time of reading data from and writing data into the NAND flash memory. The page includes a data part and a redundant part. The data part is an area accessible from the access device as a logical address space, and is an area where file data and the like are actually stored.
The redundant part is an area where management information, an ECC and the like of the recording device having the NAND flash memory is recorded, and is an area not accessible from the access device. For example, the size of the data part is about 4 KB, and the size of the redundant part is about 128 bytes. Further, the size of the physical block in the case of focusing only on the data part is about the order of 4 MB, for example. Therefore, the capacity of the NAND flash memory made up of 8192 physical blocks each having this size is 32 GB.
With the NAND flash memory having the foregoing characteristics, when the recording device is to carry out data writing in the NAND flash memory in smaller units than the physical block size, it is necessity to perform entrainment saving processing for copying valid data existing in the same block into another physical block. For this reason, in the case of writing data in the NAND flash memory in smaller units than the erase units, a recording speed decreases.
At the time of performing real-time recording such as video recording by a movie camera or a DSC, when the recording speed decreases, a speed at which stream data is recorded into the recording device may not catch up with a speed at which the stream data is generated, and the real-time recording may stop. In the video recording by the movie camera or the DSC, there are being recorded precious scenes for the user which cannot be reproduced, such as those of a sport festival or a wedding ceremony, and hence stopping of the real-time recording is a critical problem.
Conventionally, as a method for solving such a problem, there has been provided a method where a data storage area on a recording device is managed in fixed-length block units, and real-time recorded stream data is recorded into a fixed-length block whose free area (=stream data recordable area) has a size equal to or more than a threshold (e.g., Patent Document 1). In this method, since the size of existing valid data included in an area as a target for stream data recording becomes small, overhead of the entrainment saving processing becomes small. As a result, it is possible to prevent the real-time recording from stopping.
Patent Document
Patent Document 1: WO2005/055064